function setReplyTo(commentId, author) {
    document.getElementById('reply-to-id').value = commentId;
    document.getElementById('reply-to-user').textContent = author;
    document.getElementById('reply-to-info').classList.remove('d-none');
}

function cancelReply() {
    document.getElementById('reply-to-id').value = '';
    document.getElementById('reply-to-user').textContent = '';
    document.getElementById('reply-to-info').classList.add('d-none');
}

// 绑定取消回复按钮事件
document.getElementById('cancel-reply')?.addEventListener('click', function(e) {
    e.preventDefault();
    cancelReply();
});
